package com.cai.util;

import java.util.UUID;

/**
 * @author RuoLi
 * 随机生成验证码
 */
public class CreatCodeUtil {
    public static String createCode() {
        //生成uuid
        UUID uuid = UUID.randomUUID();
        //去掉 - 变成小写
        String code = uuid.toString().replace("-", "").toLowerCase();
        return code.substring(0, 6);
    }
}
